Demand charge and response management using energy storage

ABSTRACT

Systems and methods for controlling battery charge levels to maximize savings in a behind the meter energy management system include predicting a demand charge threshold with a power demand management controller based on historical load. A net energy demand is predicted for a current day with a short-term forecaster. A demand threshold maximizes financial savings using the net energy demand using a rolling time horizon optimizer by concurrently optimizing the demand charge savings and demand response rewards. A load reduction capability factor of batteries is determined with a real-time controller corresponding to an amount of energy to fulfill the demand response rewards. The net energy demand is compared with the demand threshold to determine a demand difference. Battery charge levels of the one or more batteries are controlled with the real time controller according to the demand difference and the load reduction capability factor.

BACKGROUND Technical Field

The present invention relates to energy management and more particularlydemand charge and demand response management using energy storage.

Description of the Related Art

Consumer can often be charged by demand network operators (DNOs) forenergy use according to a variety of factors. For example, time-of-usecan be charged according to when measured amounts of power are demandedfrom the grid, such as, e.g., during off-peak periods, partial peakperiods, and peak periods. Additionally, consumers can also be chargedincreased rates for increased maximum power demand, otherwise known asdemand charges. To reduce energy demanded from the grid while alsoincreasing participation in demand response rewards offered by the DNOs,consumers may utilize behind the meter (BTM) energy management systems(EMS) that may include off-grid batteries or off-grid renewable energysources such as, e.g., photovoltaics, wind, geothermal, among othersources of energy.

The behind the meter power management systems can be used to supplementpower demanded from a grid by commercial and industrial customers.However, optimizing a BTM-EMS for any one of the various rate factors,including demand charges, time-of-use charges, and savings for demandresponse can result in failure to account for greater savings in theother factors because of competing optimizations.

SUMMARY

According to an aspect of the present principles, a method is providedfor controlling battery charge levels to maximize power demand savingsin a behind the meter energy management system. The method includespredicting a demand charge threshold with a power demand managementcontroller based on historical load to reduce peak demand charges. A netenergy demand is predicted for a current day with a short-termforecaster. A demand threshold is determined for maximizing financialsavings using the net energy demand using a rolling time horizonoptimizer by concurrently optimizing the savings associated with boththe demand charge rates and the time-of-use rates, and the demandresponse rewards. A load reduction capability factor of one or morebatteries is determined with a real-time controller, the load reductioncapability factor corresponding to an amount of energy required tofulfill a load reduction corresponding to at least one of the demandresponse rewards. The net energy demand is compared with the demandthreshold to determine a demand difference with the real-timecontroller. Battery charge levels of the one or more batteries arecontrolled with the real time controller according to the demanddifference and the load reduction capability factor.

According to another aspect of the present principles, a method isprovided for controlling battery charge levels to maximize power demandsavings in a behind the meter energy management system. The methodincludes recording a power load demand, including a real-time loaddemanded from an energy distribution network and a renewable energysource utilization.

A demand charge threshold is predicted with a power demand managementcontroller based on historical load to reduce peak demand charges,including determining a billing cycle demand charge threshold based onhistorical loads from past billing cycles with a medium-term layercontroller and optimizing the demand charge threshold for a currentperiod shorter than the billing cycle using the real-time load and therenewable energy source utilization with a short-term layer controller.A net energy demand is predicted for a current day with a short-termforecaster. A demand threshold for maximizing financial savings isdetermined using the net energy demand using a rolling time horizonoptimizer by concurrently optimizing the savings associated with boththe demand charge rates and the time-of-use rates, and the demandresponse rewards. A load reduction capability factor of one or morebatteries is determined with a real-time controller, the load reductioncapability factor corresponding to an amount of energy required tofulfill a load reduction corresponding to at least one of the demandresponse rewards. The net energy demand is compared with the demandthreshold to determine a demand difference with the real-timecontroller. Battery charge levels of the one or more batteries arecontrolled with the real time controller according to the demanddifference and the load reduction capability factor.

According to another aspect of the present principles, a behind themeter energy management system is provided for controlling batterycharge levels to maximize power demand savings. The system includes apower demand management controller that predicts a demand chargethreshold based on historical load to reduce peak demand charges. Ashort-term forecaster predicts a net energy demand for a current day. Arolling time horizon optimizer determines a demand threshold formaximizing financial savings using the net energy demand by concurrentlyoptimizing the savings associated with both the demand charge rates andthe time-of-use rates, and the demand response rewards. A real-timecontroller controls battery charge levels, controlling the batterycharge levels including, determining a load reduction capability factorof one or more batteries, the load reduction capability factorcorresponding to an amount of energy required to fulfill a loadreduction corresponding to at least one of the demand response rewards,comparing the net energy demand with the demand threshold to determine ademand difference, and controlling battery charge levels of the one ormore batteries according to the demand difference and the load reductioncapability factor.

These and other features and advantages will become apparent from thefollowing detailed description of illustrative embodiments thereof,which is to be read in connection with the accompanying drawings.

BRIEF DESCRIPTION OF DRAWINGS

The disclosure will provide details in the following description ofpreferred embodiments with reference to the following figures wherein:

FIG. 1 is a block/flow diagram illustrating a high-level system/methodfor demand charge and demand response management using energy storage,in accordance with the present principles;

FIG. 2 is a block/flow diagram illustrating a system/method for amultilayer power demand management controller, in accordance with thepresent principles;

FIG. 3 is a block/flow diagram illustrating a system/method for amonthly layer for the forecasting of power demand for multi-layer powerdemand management, in accordance with the present principles;

FIG. 4 is a block/flow diagram illustrating a system/method for a dailylayer for the forecasting of power demand for multi-layer power demandmanagement, in accordance with the present principles;

FIG. 5 is a block/flow diagram illustrating a system/method forshort-term forecasting of power demand in a multi-layer power demandmanagement controller, in accordance with the present principles;

FIG. 6 is a block/flow diagram illustrating a system/method for rollingtime horizon optimization with a DCT optimizer and a rewards optimizer,in accordance with the present principles;

FIG. 7 is a flow diagram illustrating a system/method for controllingbattery charge and discharge schedules, in accordance with the presentprinciples;

FIG. 8 is a flow diagram illustrating a system/method for controllingbattery charging and discharging under a first condition, in accordancewith the present principles;

FIG. 9 is a flow diagram illustrating a system/method for controllingbattery charging and discharging under a second condition, in accordancewith the present principles; and

FIG. 10 is a flow diagram illustrating a system/method for controllingbattery charging and discharging under a third condition, in accordancewith the present principles.

DETAILED DESCRIPTION OF PREFERRED EMBODIMENTS

In accordance with the present principles, systems and methods areprovided for behind the meter energy management that concurrentlyoptimizes demand charge reductions, time-of-use charge reductions anddemand response rewards maximization to maximize financial savings.

In one embodiment, a behind the meter energy management system (BTM-EMS)monitors and balances the demand of power from a grid, batteries andrenewable energy sources, among other sources of energy. The BTM-EMStakes into account each of the demand charge, renewable energyutilization, time-of-use, and demand response as dynamic factors fordetermining an optimum battery usage decision.

According to historical power usage and renewable energy sourceutilization, demand charge thresholds (DCTs) are calculated on, e.g., amonthly basis. The DCTs can take into account both demand charges aswell as time-of-use charges according to power demanded from the grid.Accordingly, a net grid power demand is determined for a set of previousmonths in each of the off-peak, partial peak, and peak time periodsthroughout the corresponding months. According to the historical data,an optimal DCT can be predicted for a coming month that incorporates anoff-peak DCT, partial-peak DCT and peak DCT.

A daily control layer can then be used for day-ahead forecasts of powerdemand and renewable energy utilization according to historical data. Arolling-time horizon optimizer can use the day-ahead forecasts as wellas the DCTs to optimize a balance of power use from the grid, batteriesand renewables according to a minimization of costs and available powerin the batteries. To further increase savings, the optimization can takeinto account possible demand response rewards such as, e.g., peakpricing types of demand response rewards and load reduction types ofdemand response rewards, as well as others. The demand response rewardscan be optimized concurrently with the demand charge and time-of-usecharges to reduce maximize overall savings, even where demand chargegoals compete with demand response goals.

Embodiments described herein may be entirely hardware, entirely softwareor including both hardware and software elements. In a preferredembodiment, the present invention is implemented in software, whichincludes but is not limited to firmware, resident software, microcode,etc.

Embodiments may include a computer program product accessible from acomputer-usable or computer-readable medium providing program code foruse by or in connection with a computer or any instruction executionsystem. A computer-usable or computer readable medium may include anyapparatus that stores, communicates, propagates, or transports theprogram for use by or in connection with the instruction executionsystem, apparatus, or device. The medium can be magnetic, optical,electronic, electromagnetic, infrared, or semiconductor system (orapparatus or device) or a propagation medium. The medium may include acomputer-readable storage medium such as a semiconductor or solid statememory, magnetic tape, a removable computer diskette, a random accessmemory (RAM), a read-only memory (ROM), a rigid magnetic disk and anoptical disk, etc.

Each computer program may be tangibly stored in a machine-readablestorage media or device (e.g., program memory or magnetic disk) readableby a general or special purpose programmable computer, for configuringand controlling operation of a computer when the storage media or deviceis read by the computer to perform the procedures described herein. Theinventive system may also be considered to be embodied in acomputer-readable storage medium, configured with a computer program,where the storage medium so configured causes a computer to operate in aspecific and predefined manner to perform the functions describedherein.

A data processing system suitable for storing and/or executing programcode may include at least one processor coupled directly or indirectlyto memory elements through a system bus. The memory elements can includelocal memory employed during actual execution of the program code, bulkstorage, and cache memories which provide temporary storage of at leastsome program code to reduce the number of times code is retrieved frombulk storage during execution. Input/output or I/O devices (includingbut not limited to keyboards, displays, pointing devices, etc.) may becoupled to the system either directly or through intervening I/Ocontrollers.

Network adapters may also be coupled to the system to enable the dataprocessing system to become coupled to other data processing systems orremote printers or storage devices through intervening private or publicnetworks. Modems, cable modem and Ethernet cards are just a few of thecurrently available types of network adapters.

Referring now in detail to the figures in which like numerals representthe same or similar elements and initially to FIG. 1, a high-levelsystem/method for demand charge and demand response management usingenergy storage is illustratively depicted in accordance with oneembodiment of the present principles.

In one embodiment, the multi-layer adaptive demand charge managementcontrol includes a behind the meter energy management system (BTM-EMS)100. As the customer 150 draws power from the distribution network 120,a meter 130 monitors the customer's 150 power demand. The BTM-EMS 100may, therefore, be configured to detect the power demand with the meter130, and control charging and discharging of batteries 116 to managepower transactions with the distribution network 120.

Additionally, some customers 150 can utilize behind the meter renewableenergy sources 140, such as, e.g., photovoltaic (PV) cells 146, tosupplement grid power by providing energy to the batteries 116 via thebattery inverter controller 114. Thus, to better control the batteries116, the multi-layer power demand management controller 102 can monitorPV cell 146 utilization by tracking power supplied from the PV cell 146to the PV inverter controller 144 via the inverter 148, and directedtowards the batteries 110.

The BTM-EMS 100 may control the batteries 116 using the multi-layerpower demand management controller 102. According to one aspect of theinvention, the multi-layer demand charge management controller 102 mayinclude two or more layers of optimizing a demand charge threshold(DCT). The DCT may be used by the BTM-EMS 100 to determine at whatpoint, and to what extent, the power demand by the customer should besupplemented with power from the batteries 116 and PV cells 146.According to an aspect of the invention, the two or more layers mayinclude, for example, a monthly layer and a daily layer, however otherlayers could be used (e.g. yearly, seasonally, weekly, hourly, etc.).

The two or more layers of the multi-layer power demand managementcontroller 102 ensure that the DCT is optimized with minimal error byforecasting an optimal DCT over a relatively long period using a firstlayer (for example, a billing period such as a month). The forecastedDCT may then be further optimized using at least one subsequent layerthat adjusts the DCT based on a relatively shorter period forecast ofpower demand to address unpredicted power demand changes. Each layer ofthe multi-layer power demand management controller 102 may include datadriven determinations according to past behavior. For example, theforecasted DCT in the first layer may be determined according historicaldata of either the customer's 150 power demand history, or the powerdemand history of other customers if the instant customer 150 does nothave sufficient power demand history for an accurate forecast.

To further increase savings, the forecasted DCT can be split into morethan one DCT corresponding to multiple times-of-use of demanded power atthe meter 130. For example, the distribution network 120 may chargedifferent rates for different times, e.g., different times of day, week,month, or other period. One example includes a distribution network 120that charges according to off-peak, partial peak and peak periods ofeach day. Accordingly, to achieve an accurate prediction of demandcharges in the coming billing period can be forecasted for each of theoff-peak, partial peak and peak portions of each day. Accordingly, theforecasted DCT includes time-of-use variation in charges by includingthree component DCTs, an off-peak DCT, a partial peak DCT and peak DCT.

Upon determining an optimum DCT, the multi-layer power demand managementcontroller 102 may perform real-time battery control using an invertercontroller 104 to control an inverter 108. The inverter controller 104may control the inverter 108 according to the DCT optimized by themulti-layer power demand management controller 102 to discharge thebatteries 106 when power demand rises above the DCT, thus supplementingpower demanded from the distribution network 120.

Accordingly, the BTM-EMS 100 may reduce demand peaks in the case thatdemand rises above a certain DCT value. Because customers are chargedbased on energy consumed and peak power demand in a billing period (abilling period often being a month), peak power demand can result in upto 50% of a customer's power bill. As a result, the reduction in powerdemand peaks stands to significantly reduce a customer's power chargesby reducing demand charges. The use of a demand charge managementcontroller having multiple layers 102, error can be minimized. Forexample, underestimation of DCT can be prevented. By preventingunderestimation of the DCT, the BTM-EMS 100 can prevent unnecessarycharging and discharging of the batteries 106, and thereby reducingdegradation of the batteries 106, therefore increasing the lifespan ofthe batteries 106.

However, according to aspects of the present invention, reducing powerdemand peaks can inhibit demand response. Some distribution networks 120provide financial rewards for decreasing power demand to below a firmservice level (FSL) using demand response at particular times tostabilize total grid power draw, such as, e.g., scheduled load reductionprograms (SLRP), base interruptible program (BIP) and peak time rebate(PTR), among others. However, demand response rewards might not beavailable if the response requires a demand reduction at times that donot line up with the forecasted DRT, resulting in insufficient batterypower to accommodate the load reduction. As a result, the multi-layerpower demand management controller 102 can include forecasting DCTs byincorporating demand response programs and associated FSLs, along withtime-of-use as described above. As a result, the multi-layer powerdemand management controller 102 can optimize the use of batteries 110and renewable sources 140 together with demand charges, demand responserewards, and time-of-use charges to minimize costs overall.

Referring now to FIG. 2, a system/method for a multilayer power demandmanagement controller is illustratively depicted in accordance with oneembodiment of the present principles.

According to an aspect of the present invention, a multi-layer powerdemand management controller 202 may be used. The multi-layer powerdemand management controller 202 takes into account a historical load204 and real-time load 206 to control battery utilization using batterycontrol 208 and battery status 209 information. The multi-layer powerdemand management controller 202 can include a monthly layer controller210, a daily layer controller 220 and real-time battery storagecontroller 230.

The monthly layer controller 210 uses the historical load 204, includingtotal demanded power, to predict an initial DCT for a coming month. Togenerate the initial DCT, the monthly layer controller 210 can analyzetrends in historical data, such as a plurality of DCT profilescorresponding to the historical load 104, each profile including aprofile of DCTs for a corresponding month, e.g., over the past year, orother period of months.

A given DCT profile can include the optimum DCT for each day of themonth. However, a DCT profile can also include the optimum DCT for eachperiod of each day of the month. For example, the DCT profile caninclude an off-peak DCT profile corresponding to the optimum DCT of theoff-peak portion of each day of the month, as well as partial peak DCTprofile and peak DCT profile corresponding to partial peak and peakportions of each day, respectively. Accordingly, an optimum initial DCTprofile for the coming month is predicted.

The initial DCT profile is provided to the daily layer controller 220.The initial DCT value can then be adjusted by the daily layer controller220 to ensure an accurate DCT value for a coming day. Using recent loaddata, the daily layer controller 220 can forecast a load for the comingday by employing, e.g., a machine learning model such as, e.g., anauto-regressive integrated moving average (ARIMA) model to forecast theload for the coming day. The daily layer controller 220 can perform theforecast for each portion of the coming day, including, e.g., off-peaktimes of the day, partial peak and peak.

As a result, the short-term forecast for the next day can provide a moreprecise prediction of the load for the coming day. However, toincorporate the forecasted load into a monthly demand charge andtime-of-use charge reduction, the forecasted load can be used to modifythe initial DCT value to generate a modified DCT. The forecasted loadand the battery state of charge (SOC) are used to calculate anadjustment value for each time-of-use period of the coming day. Theadjustment value decreases the initial DCT to match decreased loadforecasts to compensate for overestimation of the initial DCT. As aresult, the modified DCT can facilitate lower demand charges, whilepreserving demand response throughout the month. Accordingly, theinitial DCT value provides a long-term optimization of the DCT in lightof demand response programs, while the daily layer controller 220adjusts the initial DCT to decrease the DCT for a coming day whenpossible. As a result, savings are increased by achieving a minimumdemand peak while preventing unnecessary battery degradation.

The modified DCT value will be retrieved by a real-time battery storagecontroller 230. The real-time battery storage controller 230 may be, forexample, a processor. The real-time battery storage controller 230 usesthe modified DCT value along with the SOC and battery specifications tomake a determination as to whether to charge or discharge the batteries,or to take no action. The real-time battery storage controller 230 maythen update the SOC and report the SOC to the daily layer controller220.

The multi-layer demand charge management controller 202, therefore,controls batteries of a BTM-EMS to only charge or discharge thebatteries in a way that achieves an optimum balance between demand peakshaving across multiple time-of-use periods and demand responseprograms, thus reducing costs. Also, since the proposed demand chargeand response management solution starts each month with an initialestimation of a DCT value, it may prevent unnecessary battery charge anddischarge cycles and may minimize battery degradation which may lead tomaintenance cost reduction.

Referring now to FIG. 3, a system/method for a monthly layer for theforecasting of power demand for multi-layer power demand management isillustratively depicted in accordance with one embodiment of the presentprinciples.

The monthly layer controller 210 may include a DCT data set module 212.The DCT data set module 212 may include, for example, a computer memoryor a buffer for storing a DCT data set, demand response FSLs andtime-of-use rates. The DCT set may include historical data of loadprofiles, DCT values, demand charge tariff rates and batteryspecifications, or the DCT set may be preprocessed to include a set ofrelevant DCT profiles based on the historical data.

Using the DCT data set from the DCT data set module 212, the monthlylayer controller 210 forecasts a DCT value for the coming month using amonthly DCT forecaster 214. The monthly DCT forecaster 214 may be, forexample, a computer processor. The monthly DCT forecaster 214 mayutilize the DCT data set provided by the DCT data set module 212 todetermine trends in historical data such as a plurality of DCT profilesincluding multiple months of DCT values. The DCT forecaster 214 cancompare the plurality of DCT profiles to a current DCT profile todetermine trends for predicting an initial DCT value for the comingmonth.

In particular, the monthly DCT forecaster 214 of the multi-layer demandcharge management controller forecasts an initial DCT value for a comingmonth, using trends in historical monthly DCT values, historical loadprofiles, demand charge tariff rates, time-of-use tariff rates andbattery specifications.

At the end of a most recent month, the monthly DCT forecaster 214 canfirst calculate the optimal DCT for that month given the load profile,the demand charge tariff rates and the battery specifications for thatmonth. The optimal DCT may calculated according to the followingoptimization problem:

$\begin{matrix}{{{\min\limits_{P_{b}}{DCT}} = {\max\limits_{t}{P_{g}(t)}}}{{s.t.\mspace{14mu} {SOC}^{\min}} \leq {{SOC}(t)} \leq {{SOC}^{\max}\mspace{14mu} {\forall{t \in \{ {1\mspace{14mu} \ldots \mspace{14mu} n} \}}}}}{P_{b}^{\min} \leq {P_{b}(t)} \leq {P_{b}^{\max}\mspace{14mu} {\forall{t \in \{ {1\mspace{14mu} \ldots \mspace{14mu} n} \}}}}}{{{P_{g}(t)} + {P_{b}(t)}} = {{P_{d}(t)}\mspace{14mu} {\forall{t \in \{ {1\mspace{14mu} \ldots \mspace{14mu} n} \}}}}}{{{SOC}(t)} = {{{SOC}( {t - 1} )} + {{P_{d}( {t - 1} )}\Delta \; t\mspace{14mu} {\forall{t \in \{ {1\mspace{14mu} \ldots \mspace{14mu} n} \}}}}}}} & {{Equation}\mspace{14mu} 1}\end{matrix}$

where DCT includes a component for each time-of-use rate includingoff-peak, partial peak and peak, t is the time step counter, n is thetotal number of the time steps in the whole billing period and Δt is theduration of each time step (i.e. 15 minutes), P_(g)(t) and P_(b)(t) arethe active powers provided by grid and battery discharge respectively toprovide active power demand by load P_(d)(t) at the time t, SOC^(min)and SOC^(max) are minimum and maximum allowed boundaries for the batterystate of the charge and SOC(t) is the battery state of charge at time t,and P_(b) ^(min) and P_(b) ^(max) define battery power limits.

The monthly DCT forecaster 214 generates a reference DCT profile(DCT_(ref)) from the optimal DCT values calculated for each month in aperiod of operation of the battery system, wherein the period ofoperation may span a particular number of months P, including the mostrecent month. The DCT_(ref) may comprise a time series including thecalculated optimal DCT value for each month in the period of operationP. Each optimal DCT value may have been previously calculated in amanner similar to equation 1 above.

The monthly DCT forecaster 214 selects all DCT profiles having a sameperiod of operation including P months as the DCT_(ref) period ofoperation. For example, if the period length P is one year, or twelvemonths, and the period of operation started in January and ended inDecember, The monthly DCT forecaster 214 selects each DCT profile havingDCT values for a series of 12 months spanning from January to December.All of these P-length DCT profiles are loaded into a DCT search set(DCT_(sch)).

The monthly DCT forecaster 214 then performs a normalization on theDCT_(ref) (DCT _(ref)) time series as well as each DCT series in theDCT_(sch) (DCT _(sch)) set. The normalization of the DCT profiles may bebased on, for example, the average value of each DCT profile. Thenormalization step ensures that all DCT profiles are in the same scaleof variation. By normalizing all of the DCT profiles, the monthly layer300 can more effectively determine similarity between DCT_(ref) and eachDCT profile included in DCT_(sch).

The monthly DCT forecaster 214 determines the similarity between DCT_(ref) and each DCT profile in DCT _(sch). Determining similarity mayinclude, for example, calculating the Euclidean distance between DCT_(ref) and each DCT profile in DCT _(sch). However, other methods ofdetermining similarity may be used, such as by calculating a Mikowskidistance or a Pearson correlation coefficient.

The monthly DCT forecaster 214 selects a set of all similar DCT profilesamong the DCT profiles in DCT _(sch). The similarity is based, forexample, on the calculated Euclidean distance between DCT _(ref) andeach DCT profile in DCT _(sch) and a predetermined distance threshold.The predetermine distance threshold may be a value of the greatestdistance for a profile to be deemed similar. The normalized DCT profilesthat are determined to be similar are grouped into a DCT similar set(DCT ^(s)) that can be used to forecast an initial DCT value for acoming month.

The monthly DCT forecaster 214 forecasts a normalized DCT for the comingmonth DCT _(t+1) based on DCT ^(s) and a normalized DCT value from amonth 11 months prior DCT _(t−11). For example, forecasting a DCT valuefor February of one year will include taking into account DCT ^(s) andthe normalized DCT value for February of the previous year. Theforecasting may include calculating a forecasting equation such asequation 2 below:

$\begin{matrix}{{\overset{\_}{DCT}}_{t + 1} = {\frac{1}{M + 1}\lbrack {{\overset{\_}{DCT}}_{t - 11} + {\sum_{i = 1}^{M}{\overset{\_}{DCT}}_{i}^{s}}} \rbrack}} & {{Equation}\mspace{14mu} 2}\end{matrix}$

where M is the number of profiles DCT ^(s).

If DCT ^(s) includes the DCT profile from the previous year, equation 2may be adjusted to increase the weight of DCT _(t−11) in order toaccount for seasonality in power loads. For example, the monthly DCTforecaster 214 can adjust equation 2 as shown below in equation 3:

$\begin{matrix}{{\overset{\_}{DCT}}_{t + 1} = {\frac{1}{{2\; M} - 2}\lbrack {{( {M - 2} ) \times {\overset{\_}{DCT}}_{t - 11}} + {\sum_{i = 1}^{M}{\overset{\_}{DCT}}_{i}^{s}}} \rbrack}} & {{Equation}\mspace{14mu} 3}\end{matrix}$

The monthly DCT forecaster 214 then denormalizes DCT _(t+1) to generatean initial DCT value for the coming month.

Referring now to FIG. 4, a system/method for a daily layer for theforecasting of power demand for multi-layer power demand management isillustratively depicted in accordance with one embodiment of the presentprinciples.

The initial DCT value may then be adjusted by the daily layer controller220 to ensure an accurate DCT value for a coming day by updating theinitial DCT 211 with a DCT updater 222. The DCT updater 222 takes intoaccount the demand/PV history 217 to reduce overestimation of theinitial DCT 211 as described above with reference to FIG. 2. The DCTupdater 222 may also perform a data cleansing operation to removeabnormal past load patterns from the data set, such as holidays.

In particular, the initial DCT 211 along with the demand/PV history 217and a battery state of charge (SOC) reported by the real-time controller230 can be used to adjust the initial DCT value to compensate foroverestimations. For example, the DCT updater 22 can optimize anadjustment value that is the minimum achievable increase to the initialDCT 211 value that will achieve a minimum demand peak while preventingunnecessary battery degradation. The adjustment value can, therefore,modify the initial DCT 211 to compensate for error in the initial DCTvalue due to load irregularities as a result of factors such as weatheror holidays.

The daily layer controller 220 can also perform short-term loadforecasting using a short-term load forecaster 300. The short-term loadforecaster 300 may be, for example, a processor. The short-term loadforecaster 300 can forecast load for the next day by retrieving loaddata for a given period, such as load profiles including demand behaviorfor each day over the past four weeks as well as renewable energyutilization such as, e.g, PV cell utilization. Using the load data andPV utilization data, the short-term load forecaster 300 can use machinelearning, such as, e.g., a model stored in a memory, to predict the loadfor the next day. For example, the short-term load forecaster 222 mayuse a time series model, such as an auto-regressive integrated movingaverage (ARIMA) model to forecast the net load for the coming day, wherethe net load is the load demanded from the grid minus the PV energyavailable.

The modified DCT and the predicted net load can be retrieved by arolling time horizon optimizer 400 that determines an optimum demandreduction schedule for the coming day. The rolling time horizonoptimizer 400 may be, for example, a processor. The optimum demandreduction schedule can depend on PV utilization, demand charge tariffs,time-of-use rates and demand response rewards, among other factors.

The daily layer controller 220 performs short-term load forecastingusing a short-term load forecaster 300. The short-term load forecaster300 may be, for example, a processor. The short-term load forecaster 300can forecast load for the next day by retrieving load data for a givenperiod, such as load profiles including demand behavior for each dayover the past four weeks. Using the load data, the short-term loadforecaster 222 may use machine learning to predict the load for the nextday. For example, the short-term load forecaster 222 may use a timeseries model, such as an auto-regressive integrated moving average(ARIMA) model to forecast the load for the coming day.

In particular, the rolling time horizon optimizer 400 can performoptimization by determining the optimum DCTs according to teachtime-of-use rate in the coming day can calculating savings according tothe demand charge costs for each time-of-use rate, determine rewardamounts according to available demand response programs, and optimizingthe combination of savings and rewards to increase total amount savedover both demand charge reduction and demand response rewards.

Using the short-term load forecast, as well as the modified DCT anddemand response event signals 215, the rolling time horizon optimizer400 can determine the optimum DCTs to reduce demand charges. However,the grid operator may have demand reduction rewards for responding todemand response programs. Thus, savings can be increased by reducingdemand during the demand response program times. However, the demandresponse programs may run counter to some goals of the demand chargereduction, such as, e.g., altering battery charging schedules such thatthe batteries are not charged enough to respond to the DCT or FSL. Toprevent these conflicts between optimizing the DCT and the demandresponse (DR) individually, the rolling time horizon optimizer 400optimizers both costs savings due to demand charges and rewards due todemand response together. Thus, a financial framework focused onoptimizing for savings maximizes the money saved due to both demandcharge reduction and demand response rewards, e.g., as shown in equation4 below:

$\begin{matrix}{{\max\limits_{P_{B},{DCT},\overset{\_}{D}}( {{SAV}_{DC} + {REW}_{DR}} )},} & {{Equation}\mspace{14mu} 4}\end{matrix}$

Where P_(B) is power drawn from the batteries, DCT is the modified DCT,D is a demand threshold, SAV_(DC) is the savings due to demand chargereduction, and REW_(DR) is the rewards due to demand response programs.

To accurately optimize the modified DCT, the modified DCT is furtheraugmented to take into account demand response reward programs to formthe demand threshold D. The demand response rewards can include a FSL,where demand above the FSL can either disqualify a customer for areward, and/or penalize the customer for the overage. Thus, the modifiedDCT can be characterized as a demand threshold D where the D is themodified DCT when the FSL is greater than the DCT, otherwise the D isset as the FSL. Therefore, the rolling time horizon optimizer 400prevents power demanded from the grid from going over the FSL while alsominimizing costs according to the modified DCT.

The modified DCT value will be retrieved by a real-time battery storagecontroller 230. The real-time battery storage controller 230 may be, forexample, a processor. The real-time battery storage controller 230 usesthe modified DCT value along with the SOC and battery specifications tomake a determination as to whether to charge or discharge the batteries,or to take no action. The real-time battery storage controller 230 maythen update the SOC and report the SOC to rolling time horizon optimizer400 for later DCT optimization.

Referring now to FIG. 5, a system/method for short-term forecasting ofpower demand in a multi-layer power demand management controller isillustratively depicted in accordance with one embodiment of the presentprinciples.

The daily layer controller 220 can facilitate optimization of costsavings by determining a more accurate load for a coming day using theshort-term forecaster 300. To improve accuracy, the short-termforecaster 300 can include a data cleanser 310. The data cleanser 310analyzes the demand/PV history 217 and, e.g., removes abnormal datapoints and outliers, such as, e.g., data for holidays, unusual weather,or other abnormal condition affecting power demand.

Using the cleansed history, the short-term forecaster 300 trains amodel, such as, e.g., an ARIMA model or a seasonal ARIMA (SARIMA) modelto learn power demand behaviors with the training model 330. Thetraining model 330 can be provided with a new cleansed history every,e.g., day to update the model. Thus, every new day utilizes an updatedtraining model 330 for forecasting the load for the coming day to updatethe model parameters (e.g. the coefficients of the seasonal ARIMAmodel).

In order to account for seasonality, a separate model is trained foreach day of the week. For example, if the current time is the beginningof Monday, the seasonal ARIMA model is trained using previous Mondaysload profiles. Therefore, the ARIMA model will be trained only with pastload profiles for the same day of the week as is being forecasted. Themodel order 302 of the ARIMA model can be determined usingauto-correlation and partial auto-correlation tests, or otherwiseprovided to the short-term forecaster 300 for use by the training model330.

The model learned by the training model 330 can then be provided to theforecast model 320. The forecast model 320 implements the trained modelto provide, e.g., a 24-hour ahead forecast of load. Thus, at thebeginning of a day, the forecast model 320 receives the updated trainedmodel from the training model 330 and uses the trained model throughoutthe day to regularly forecast 24 hours ahead, until the beginning of thenext day, when a newly updated trained model is produced. To provide aconstant day-ahead forecast 303 of the load, the forecast model 320 canbe re-initiated periodically, e.g., every 15 minutes. Thus, the dailylayer controller 220 can maintain a substantially constant day aheadforecast 303 for optimization of the DCT and power use and allocationfor increased savings and efficiency.

Referring now to FIG. 6, a system/method for rolling time horizonoptimization with a DCT optimizer and a rewards optimizer isillustratively depicted in accordance with one embodiment of the presentinvention.

The rolling time horizon optimizer 400 uses the modified DCT 401 andday-ahead forecast 303 to optimize a power use profile 402 formaximizing savings. According to aspects of the present embodiment, therolling time horizon optimizer 400 can include modules such as a DCToptimizer 410 to optimize the DCT values, and rewards optimizer 420 toconcurrently optimize the savings and the rewards related to demandcharges and demand response programs, respectively.

Demand charge rates can vary depending on time of day. Thus, thetime-of-use of power demand effects the demand charges for power demand.Similarly, demand response programs can also effect demand charges. As aresult, optimization of the DCT can take into account the effects of thedemand response programs and time-of-use to improve cost savings withappropriately optimized DCTs, including off-peak, partial peak and peakDCTs. Accordingly, the costs associated with DCTs can be determined by,e.g., equation 5 below:

(C _(off)(DR)ΔDCT _(off) +C _(par)(DR)ΔDCT _(par) +C _(peak)(DR)ΔDCT_(peak)),   Equation 5

where C_(off), C_(par) and C_(peak) are the demand charge tariff costsfor off-peak, partial peak and peak times, respectively, ΔDCT_(off),ΔDCT_(par) and ΔDCT_(peak) are changes to the off-peak, partial peak andpeak DCT values, respectively, and DR is a demand response event signal.Accordingly, a cost of a set of changes to the modified DCT values canbe determined according to the changes, the demand response signal andthe time-of-use rates.

However, costs are also balanced with power sold back, currentlyapplicable time-of-use and demand response rates, and battery state ofcharge. Time-of-use at a current time can be characterized as TOU(DR,t)P_(G)(t), where TOU refers to time-of-use as it depends on demandresponse signals DR and time t, and P_(G)(t) is the power demanded fromthe grid at time t. Selling power back to the grid by, e.g., PVutilization, can be characterized as γP_(sell)(t), where P_(sell)(t) isthe power sold to the grid at time t, and γ is the penalty associatedwith injecting power back into the grid. Battery state of charge can betaken into account with βSOC(t), where β is coefficient for weightingSOC maximization and SOC(t) is the battery state of charge at time t.Each of these functions can be used to optimize the change to the DCT tominimize costs as balanced with battery SOC, time-of-use and PVutilization using, e.g., equation 6 below:

$\begin{matrix}{  {\min\limits_{P_{B}}\{ {( {{{C_{off}({DC})}\Delta \; {DCT}_{off}} + {{C_{par}({DC})}\Delta \; {DCT}_{par}} + {{C_{peak}({DC})}\Delta \; {DCT}_{peak}}} ) + {\sum_{t_{0}}^{T + t_{0}}( {{{TOU}( {{DR},T} )}{P_{G}(t)}} )} + {\sum_{t_{0}}^{T + t_{0}}( {\gamma \; {P_{sell}(t)}} )} + {\sum_{t_{0}}^{T + t_{0}}{( {\beta \; {SOC}} )t}}} )} ) \}.} & {{Equation}\mspace{14mu} 6}\end{matrix}$

However, as described above, to accurately represent savings, rewardsdue to demand response programs can be taken into account, such as withequation 4 above. As such, the rolling time horizon optimizer 400includes the optimization of both savings due to demand chargesdetermined from the optimized DCT changes of equation 6 above, andrewards due to demand response programs using the rewards optimizer 420.

The rewards optimizer 420 can take into account variety of rewardsprograms to determine rewards, such as, e.g., peak pricing demandresponse, scheduled load reduction programs, base interruptibleprograms, and peak time rebates, among others. For example, rewards in apeak pricing program, REW_(pp), can be modeled by equation 7 below:

REW _(pp)=Σ_(T) ₀ ^(T+t) ⁰ (C _(peak)(D(t)−P _(G)(t))),   Equation 7

where C_(peak) is the cost associated with demand during peak pricingperiods, D(t) is the forecasted demand at time t, and P_(G)(t) is thegrid demand at time t.

Rewards from a scheduled load reduction program, REW_(slrp), can bemodeled by equation 8 below:

REW _(slrp)=Σ_(t) ₀ ^(T+t) ⁰ (r _(inc)(D _(B)(t)−P _(G)(t))),   Equation8

where r_(inc) is a rate incentive for reducing demand below a baselinedemand at time t, D_(B)(t), set by the grid operator, where r_(inc) iszero when grid power is greater than an FSL.

Rewards from a base interruptible program, REW_(bip), can be modeled byequation 9 below:

REW _(bip)=Σ_(t) ₀ ^(T+t) ⁰ (r _(inc)(D _(B)(t)−P _(G)(t))−C _(pen)(P_(G)(t)−FSL(t))),   Equation 9

where C_(pen) is the penalty associated with grid power P_(G) exceedingthe firm service level FSL at time t as set by the operator, whereC_(pen) is zero when the FSL is greater than the grid power.

Rewards from a peak time rebate program, REW_(ptr), can be modeled byequation 10 below:

REW _(ptr)=Σ_(t) ₀ ^(T+t) ⁰ (r _(inc)(D _(B)(t)−P _(G)(t))),   Equation10

where r_(inc) is zero when forecasted power demand D_(B) is greater thanor equal to grid power P_(G).

Accordingly, total demand response rewards REW_(DR) can be representedby the sum of each of equations 7-10, such as in equation 11 below:

REW _(DR) =REW _(pp) +REW _(slrp) +REW _(bip) +REW _(ptr).   Equation 11

As a result, the savings determined by optimizing the DCT according toequation 5 above, and the rewards determined by equation 11 can be usedby the rewards optimizer 420 to concurrently optimize savings andrewards to maximize total savings, as per equation 4 above, to generatea threshold profile 402, provided that power from the grid is kept belowthe demand threshold, and battery SOC is maintained between a maximumand minimum SOC.

Referring now to FIG. 7, a system/method for controlling battery chargeand discharge schedules is illustratively depicted in accordance withone embodiment of the present principles.

As described above, thresholds from the daily layer controller 220 areprovided to the real-time controller 230, including the thresholdprofile 402. The threshold profile 402 can include the optimized DCT andthe FSLs using the overall demand threshold DT. The real-time controller230 uses the DT to control the batteries to efficiently control chargingand discharging of the batteries within the DT.

To accomplish the battery control, as described above, at step 701, acontroller such as the daily layer controller 220 can predict demand andrenewable energy generation to calculate a net demand Nd demanded fromthe grid.

At block 702, a power demand management controller, such as themulti-layer power demand management controller 202 described above,including the monthly layer controller 210 and the daily layercontroller 220, can then determine an optimum demand threshold DT for acurrent time period. The DT can be determined using a monthly layer, andthen refined and optimized in a daily layer for a short-term forecastedload, as described above. Thus, an optimum DT for maximizing savings canbe used that takes into account demand response program rewards.

To properly control batteries, the available energy stored in thebatteries is determined and the energy needed to fulfill load reductionto satisfy the DT is determined. The available energy stored in thebatteries is the load reduction capability of the system because it isthe power available to supplement grid demand. At block 703, a loadreduction capability factor (LRC) is determined that compared the loadreduction capability with the load reduction requirement according tothe DT. The LRC can be calculated as the sum of the different betweennet demand Nd and the DT across time (Σ_(t) ^(T)(Nd(t)−DT(t))).

Having determined the DT and the degree to which the battery cansupplement energy to accommodate the DT according to the LRC, at block704 the net demand Nd is compared to the DT. Depending on the relativemagnitude of the net demand Nd and the DT, the controller can select aprocess for determining charge and discharge amounts. For example, thebattery is charge or discharged according to process 800 where netdemand is greater than the demand threshold. Where net demand Nd isbetween zero and the demand threshold, process 900 is followed. Wherenet demand Nd is below zero, process 1000 is followed.

According to the process followed, the battery is charged or dischargedat block 705. Accordingly, the battery can be controlled according tothe LRC depending on DT requirements.

Referring now to FIG. 8, a system/method for controlling batterycharging and discharging under a first condition is illustrativelydepicted in accordance with one embodiment of the present principles.

As described above, a controller can control batteries according toprocess 800 where net demand Nd is greater than the DT. To do so, atblock 802, the LRC is checked for whether the LRC is greater than astored energy of the battery, such that the stored energy is between aminimum and a maximum SOC of the battery.

If the LRC is greater than the stored energy of the battery, the batteryis controlled to discharge, at block 806, according to the DT. Forexample, the battery can discharge to supplement grid power to providethe difference between the net demand Nd and the DT. Thus, the gridprovides power up to the DT, and the battery provides the remainder ofthe net demanded energy.

If the LRC is less than the stored energy of the battery, a differencebetween the stored energy and the LRC is compared at block 804 against acurtailment energy that is defined as the different between the netdemand Nd and the DT.

If the difference between the stored energy and the LRC is less than orequal to the curtailment energy, the battery is discharged at block 806,as described above. However, if the different between the stored energyand the LRC is greater than the curtailment energy, then the battery iscontrolled to discharge energy according to block 808. At block 808, thebattery is discharged to supplement the net demand according to thedifferent between the stored energy and the LRC. Thus, the battery iscontrolled such that load reduction capability is not exceeded. A newcurtailment energy can then be determined taking into account the powersupplemented by discharging the batteries by subtracting the powersupplied by the batteries from the net demand.

Referring now to FIG. 9, a system/method for controlling batterycharging and discharging under a second condition is illustrativelydepicted in accordance with one embodiment of the present principles.

As described above, a controller can control batteries according toprocess 900 where net demand Nd is between zero and the DT, where thedifference between the net demand Nd and the DT can be used to chargebatteries as chargeable energy. To do so, at block 902, the LRC and thestored energy are compared.

If the LRC is greater than the stored energy, then the differencebetween LRC and the stored energy can be compared to the chargeableenergy. If the difference is greater than the chargeable energy, thebattery can be controlled to be charged according to the chargeableenergy to maximize energy stored in the battery at block 910. However,if the difference is less than the chargeable energy, then the batterycan charged according to the difference at block 912 such that thebatteries are filled to maximum capacity. Therefore, charging of thebatteries are maximized depending on the LRC and an amount of headroomfor greater power demand before reaching the DT. Thus, available powerdemand below the DT is maximized.

However, if the LRC is less than the stored energy, thus resulting inexcess energy in the batteries, the excess energy can be compared to thenet demand Nd at block 906. Where the excess energy is greater than thenet demand Nd, the battery can be controlled to be discharged at block914 to supplement power demand according to the net demand. Thus, excessenergy in the batteries can be leveraged to provide the energy ofrequired for the net demand. However, if the excess energy is less thanthe net demand Nd, then the battery can be controlled to discharge theexcess energy at block 916. Thus, the excess energy can be leveraged tosupplement at least a part of the net demand without wasting batterypower.

Referring now to FIG. 10, a system/method for controlling batterycharging and discharging under a third condition is illustrativelydepicted in accordance with one embodiment of the present principles.

As described above, a controller can control batteries according toprocess 1000 where net demand Nd is less than zero. To do so, at block1002, the battery is controlled to be charged according to the netdemand. Therefore, excess power, e.g., from PV cells or other renewablesthat drive the net demand below zero, can be transferred to thebatteries for later use. Accordingly, the excess power is not wasted andlong-term costs can be reduced by stored the excess power.

The foregoing is to be understood as being in every respect illustrativeand exemplary, but not restrictive, and the scope of the inventiondisclosed herein is not to be determined from the Detailed Description,but rather from the claims as interpreted according to the full breadthpermitted by the patent laws. It is to be understood that theembodiments shown and described herein are only illustrative of theprinciples of the present invention and that those skilled in the artmay implement various modifications without departing from the scope andspirit of the invention. Those skilled in the art could implementvarious other feature combinations without departing from the scope andspirit of the invention. Having thus described aspects of the invention,with the details and particularity required by the patent laws, what isclaimed and desired protected by Letters Patent is set forth in theappended claims.

What is claimed is:
 1. A method for controlling battery charge levels tomaximize power demand savings in a behind the meter energy managementsystem, the method comprising: predicting a demand charge threshold witha power demand management controller based on historical load to reducepeak demand charges; optimizing the demand charge threshold with ademand charge threshold optimizer by modifying the demand chargethreshold for each of a plurality of time-of-use periods with a demandcharge threshold modification corresponding to a tariff ratecorresponding to each of the plurality of time-of-use periods to form anoptimized demand charge threshold including each of the demand chargethreshold modifications; predicting a net energy demand for a currentday with a short-term forecaster; determining a demand threshold formaximizing financial savings using the net energy demand; comparing thenet energy demand with the demand threshold to determine a demanddifference with the real-time controller; and controlling battery chargelevels of the one or more batteries with the real time controlleraccording to the demand difference.
 2. The method as recited in claim 1,wherein predicting the demand charge threshold further includes:determining a billing cycle demand charge threshold based on historicalloads from past billing cycles with a medium-term layer controller; andoptimizing the demand charge threshold for a current period shorter thanthe billing cycle using the real-time load and the renewable energysource utilization with a short-term layer controller.
 3. The method asrecited in claim 2, wherein the billing cycle is one month.
 4. Themethod as recited in claim 2, wherein the current period is one day. 5.The method as recited in claim 1, further including recording a powerload demand, including a real-time load demanded from an energydistribution network and a renewable energy source utilization.
 6. Themethod as recited in claim 1, wherein determining the demand thresholdincludes: determining an optimum demand charge threshold for reducingdemand charges; and determining firm service levels corresponding todemand response programs issued for a distribution network, wherein thedemand threshold is defined by the firm service levels when the optimumdemand charge threshold exceeds the firm service levels.
 7. The methodas recited in claim 1, further including determining demand responserewards by summing rewards and penalties associated with power demandedfrom the grid compared to firm service levels of demand responseprograms issued for a distribution network.
 8. The method as recited inclaim 1, further including concurrently optimizing financial savingsincluding: summing demand charge savings associated with the demandcharge threshold with rewards associated with firm service levels ofdemand response programs issued for a distribution network to produce atotal savings; and maximizing a reduction in the demand charge thresholdaccording to the total savings.
 9. The method as recited in claim 1,further including determining a battery state of charge to preventdischarge the one or more batteries below a minimum state of charge. 10.A method for controlling battery charge levels to maximize power demandsavings in a behind the meter energy management system, the methodcomprising: recording a power load demand, including a real-time loaddemanded from an energy distribution network and a renewable energysource utilization; predicting a demand charge threshold with a powerdemand management controller based on historical load to reduce peakdemand charges, the predicting a demand charge threshold including:determining a billing cycle demand charge threshold based on historicalloads from past billing cycles with a medium-term layer controller; andoptimizing the demand charge threshold for a current period shorter thanthe billing cycle using the real-time load and the renewable energysource utilization with a short-term layer controller; optimizing thedemand charge threshold with a demand charge threshold optimizer bymodifying the demand charge threshold for each of a plurality oftime-of-use periods with a demand charge threshold modificationcorresponding to a tariff rate corresponding to each of the plurality oftime-of-use periods to form an optimized demand charge thresholdincluding each of the demand charge threshold modifications; predictinga net energy demand for a current day with a short-term forecaster;determining a demand threshold for maximizing financial savings usingthe net energy demand; comparing the net energy demand with the demandthreshold to determine a demand difference with the real-timecontroller; and controlling battery charge levels of the one or morebatteries with the real time controller according to the demanddifference.
 11. The method as recited in claim 10, wherein the billingcycle is one month.
 12. The method as recited in claim 10, wherein thecurrent period is one day.
 13. The method as recited in claim 10,wherein determining the demand threshold includes: determining anoptimum demand charge threshold for reducing demand charges; anddetermining firm service levels corresponding to demand responseprograms issued for a distribution network, wherein the demand thresholdis defined by the firm service levels when the optimum demand chargethreshold exceeds the firm service levels.
 14. The method as recited inclaim 10, further including determining demand response rewards bysumming rewards and penalties associated with power demanded from thegrid compared to firm service levels of demand response programs issuedfor a distribution network.
 15. The method as recited in claim 10,further including concurrently optimizing the financial savingsincluding: summing demand charge savings associated with the demandcharge threshold with rewards associated with firm service levels ofdemand response programs issued for a distribution network to produce atotal savings; and maximizing a reduction in the demand charge thresholdaccording to the total savings.
 16. The method as recited in claim 10,further including determining a battery state of charge to preventdischarge the one or more batteries below a minimum state of charge. 17.A behind the meter energy management system for controlling batterycharge levels to maximize power demand savings, the system comprising: apower demand management controller that predicts a demand chargethreshold based on historical load to reduce peak demand charges; ademand charge optimizer that optimizes the demand charge threshold bymodifying the demand charge threshold for each of a plurality oftime-of-use periods with a demand charge threshold modificationcorresponding to a tariff rate corresponding to each of the plurality oftime-of-use periods to form an optimized demand charge thresholdincluding each of the demand charge threshold modifications; ashort-term forecaster that predicts a net energy demand for a currentday; a rolling time horizon optimizer that determines a demand thresholdfor maximizing financial savings using the net energy demand; and areal-time controller that controls battery charge levels, controllingthe battery charge levels including: comparing the net energy demandwith the demand threshold to determine a demand difference; andcontrolling battery charge levels of the one or more batteries accordingto the demand difference.
 18. The behind the meter energy managementsystem as recited in claim 17, further including a demand chargethreshold optimizer that determines the demand threshold, including:determining an optimum demand charge threshold for reducing demandcharges; and determining firm service levels corresponding to demandresponse programs issued for a distribution network, wherein the demandthreshold is defined by the firm service levels when the optimum demandcharge threshold exceeds the firm service levels.
 19. The behind themeter energy management system as recited in claim 17, further includinga rewards optimizer that determines demand response rewards by summingrewards and penalties associated with power demanded from the gridcompared to firm service levels of demand response programs issued for adistribution network.
 20. The behind the meter energy management systemas recited in claim 17, wherein the rolling time optimizer includes arewards optimizer to concurrently optimize the financial savings,including: summing demand charge savings associated with the demandcharge threshold with rewards associated with firm service levels ofdemand response programs issued for a distribution network to produce atotal savings; and maximizing a reduction in the demand charge thresholdaccording to the total savings.